package lab03.test09;

import java.io.*;

public class Test {
    public static void main(String[] args)throws IOException {
        Book a1=new Book("1001","Java程序设计","第2版", 56.9f,560);
        Book a2=new Book("1002","Java开发实战","第1版", 98.9f,820);
        Book a3=new Book("1003","C++程序设计指南","第3版", 62.5f,362);
        Book a4=new Book("1004","EJB3.0入门经典","第1版", 59.8f,1280);
        Book a5=new Book("1005","Spring3.0 in Action","第3版", 95.8f,1189);
        Book book[]={a1,a2,a3,a4,a5};
        String text=null;
        for (int i=0;i<book.length;i++){
            text +=book[i];
            text +='\n';
        }
        BufferedWriter target=new BufferedWriter(new FileWriter("D:\\book.txt"));
        target.write(text);
        target.flush();
    }
}
